package node;
/*
* 带头结点的链表 测试
* */
public class SingleNodeTest {
    public static void main(String[] args) {
       /* MyNode<Integer> node1 = new MyNode<>(3);
        MyNode<Integer> node2 = new MyNode<>(2);
        MyNode<Integer> node3 = new MyNode<>(1);

        SingleLinkedList linkedList = new SingleLinkedList();
        *//*linkedList.addNode(node1);
        linkedList.addNode(node2);
        linkedList.addNode(node3);*//*

        linkedList.SortNodeAdd(node1);
        linkedList.SortNodeAdd(node2);
        linkedList.SortNodeAdd(node3);
        linkedList.list();*/

        MyNode wzz = new MyNode(3, "wzz");
        MyNode qwe = new MyNode(2, "qwe");
        MyNode ert = new MyNode(1, "ert");

        SingleLinkedList linkedList = new SingleLinkedList();
        linkedList.sortNodeAdd(wzz);
        linkedList.sortNodeAdd(qwe);
        linkedList.sortNodeAdd(ert);

        linkedList.list();
        System.out.println("===================================");
        linkedList.deleteNode(1);
        linkedList.list();


        System.out.println("==================================");
        linkedList.updateNode(new MyNode(2,"try"));
        linkedList.list();

    }
}

